#ifndef _WEAPON_H_
#define _WEAPON_H_

#include "vec.hpp"

class Enemy;

#include "actor.hpp"

class Weapon : public Actor
{
public:
	class Type;

	class Melee;
	class Bullet;
	class Bubble;
	class Cloud;
	class Ball;
	class Option;
	class Nuke;

	enum TypeN
	{
		NOTYPE = -1,
		MELEE,
		MELEE2,
		MELEE3,
		MELEECT,
		BULLET = MELEECT,
		BUBBLE,
		CLOUD,
		BALL,
		OPTION,
		NUKE,
		TYPECT
	};

	static int TDamage(int t);
	int Damage()
	{
		return dmg;
	}
	
	static int TCost(int t);
	int Cost()
	{
		return TCost(typen);
	}

	bool IsShot()
	{
		return typen >= MELEECT && typen < NUKE;
	}

	Weapon();
	~Weapon();

	static bool Open();

	void Init(float x, float centy, Cue & cue);
	void In();
	void Update();

	void Hit(Enemy & en);

	void StgBreak();

	friend class Enemy;
	friend class Player;

private:
	Type *type;
	int typen;

	int dmg;
	int kills;
};

#include "actor.hpp"
extern ActPool<Weapon, 8> Wpns;

#endif
